<?php

use yii\db\Migration;

/**
 * Class m190319_135349_add_cloumn_view_num_on_Job_table
 */
class m190319_135349_add_cloumn_view_num_on_Job_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('job', 'view_num', $this->integer()->comment("报名查看人数")->defaultValue(0));

    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('job', 'view_num');

        return true;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m190319_135349_add_cloumn_view_num_on_Job_table cannot be reverted.\n";

        return false;
    }
    */
}
